gtkplacessidebar.c: move bookmark at the placeholder index
authorNelson Benítez León <nbenitezl+gnome@gmail.com>
Sat, 7 Oct 2017 15:17:20 +0000 (20:17 +0500)
committerDaniel Boles <dboles.src@gmail.com>
Mon, 17 Dec 2018 19:19:20 +0000 (19:19 +0000)
As that index is set in drag_motion_callback() and visually shown
on the widget as a drop target hint.

https://bugzilla.gnome.org/show_bug.cgi?id=787356
https://gitlab.gnome.org/GNOME/gtk/issues/904

gtk/gtkplacessidebar.c

index 97aa807c0d2c2058aa669fa88965cc4391c15a2b..8651fac64015e0e352a5628c50328d15879024c2 100644 (file)
@@ -2037,6 +2037,9 @@ drag_data_received_callback (GtkWidget        *list_box,
 
       source_row = (void*) gtk_selection_data_get_data (selection_data);
 
+      if (sidebar->row_placeholder != NULL)
+        g_object_get (sidebar->row_placeholder, "order-index", &target_order_index, NULL);
+
       reorder_bookmarks (sidebar, GTK_SIDEBAR_ROW (*source_row), target_order_index);
       real_action = GDK_ACTION_MOVE;
     }